package cn.qdhlm.testrocketmq;

import cn.qdhlm.testrocketmq.rocketmqhelper.RocketMqProducer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Name:TestProducerController
 * @description:
 * @author: xinY
 **/
@RestController
public class TestProducerController {
    @Autowired
    private RocketMqProducer producer;
    @GetMapping("/send")
    public void send() {
        for (int i = 0; i < 100; i++) {
            producer.send("server1", "message from producerController : " + i);
        }
    }
}
